package wci.backend.interpreter;

/**
 * <h1>RuntimeErrorCode</h1>
 *
 * <p>运行时错误代码</p>
 *
 * <p>Copyright (c) 2009 by Ronald Mak</p>
 * <p>For instructional purposes only.  No warranties.</p>
 */
public enum RuntimeErrorCode
{
    UNINITIALIZED_VALUE("没有初始化的值"),
    VALUE_RANGE("值超过范围"),
    INVALID_CASE_EXPRESSION_VALUE("非法的CASE表达式值"),
    DIVISION_BY_ZERO("除零操作"),
    INVALID_STANDARD_FUNCTION_ARGUMENT("无效的标准函数参数"),
    INVALID_INPUT("非法输入"),
    STACK_OVERFLOW("运行时栈溢出"),
    UNIMPLEMENTED_FEATURE("待实现语言特征");

    private String message;  // 错误消息

    RuntimeErrorCode(String message)
    {
        this.message = message;
    }

    public String toString()
    {
        return message;
    }
}
